package com.erpanderp.wam.usm.view.user;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;


@ManagedBean
@ViewScoped
public class LoginInfoBean {
	
	HttpSession session = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
	
	public LoginInfoBean(){
		System.out.println("LOGOUT INTIALIZING...");
	}
	public String logout(){
		if(session != null){
			session.invalidate();
		}
		System.out.println("IN LOGOUT BEAN");
		return "login";
	}

}
